|
|
|
|
|
|
|
Day 15, Adding Advanced Features |
|
|
|
 |
|
|
|
|
1. The SetData method is used to place data into the DataObject when the OLEStarDrag event is triggered, or it can be used in the OLESetData event. |
|
|
|
 |
|
|
|
|
2. Feedback is given to the user when the OLE drag-and-drop operation has been completed in the OLECompleteDrag event, which is triggered when the process is finished. |
|
|
|
|
|
|
|
|
The best way to process a delete is to use the delete routine already present in the frmAddressEntry form. The code in Listing A.7 shows how to do this without users seeing the entry form itself. |
|
|
|
|
|
|
|
|
LISTING A.7. DELETEENTRY.TXTDELETING AN ENTRY WITH THEcmdDeleteCLICK EVENT ROUTINE IN THEAddressEntryFORM. |
|
|
|
 |
|
|
|
|
Private Sub picDelete_OLEDragDrop(Data As DataObject, Effect As Long, _
Button As Integer, Shift As Integer, X As Single, Y As Single)
frmAddressEntry.sqlEntry = select * from [Address Entry] Where _
[AddressID] = & Mid(tvTreeView.SelectedItem.Key, 1, 3)
frmAddressEntry.Load
frmAddressEntry.Visible = False
frmAddressEntry.cmdDelete.Value = True
End Sub |
|
|
|
|
|
|
|
|
Day 16, Coping with Error Handling |
|
|
|
 |
|
|
|
|
1. An error trap is a term that describes the detection of an error during the execution of an application. |
|
|
|
 |
|
|
|
|
2. The first type is one that can be found and corrected during the testing process; the other type must be handled during the normal execution of the application. |
|
|
|
 |
|
|
|
|
3. There are three ways to have your application code continue after an error has occurred. You can use any of the Resume statement versions: Resume [Line ¦ Label], Resume Next, or Resume. |
|
|
|
|
|